﻿
using Irony.Compiler;

using IronLua.Ast;

namespace IronLua.Parser {

	public class LuaParser {

		static readonly LuaGrammar Grammar = new LuaGrammar ();

		public static BlockStatement Parse (string chunk)
		{
			var compiler = new LanguageCompiler (Grammar);
			return compiler.Parse (chunk).To<BlockStatement> ();
		}

		public static BlockStatement ParseInteractive (string chunk)
		{
			throw new System.NotImplementedException ();
		}
	}
}
